]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: Minor code cleanup
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 23 Nov 2012 03:39:19 +0000 (04:39 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 30 Nov 2012 19:04:22 +0000 (20:04 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=688913

js/ui/altTab.js

index 9d2727e443c803f3fc0a4fd4a6ae61949ef3e80e..5de7d7b26b8e62c74744df0650bee39e946a7ebf 100644 (file)
@@ -349,17 +349,13 @@ const AltTabPopup = new Lang.Class({
     _appActivated : function(appSwitcher, n) {
         // If the user clicks on the selected app, activate the
         // selected window; otherwise (eg, they click on an app while
-        // !mouseActive) activate the the clicked-on app.
-        if (n == this._currentApp) {
-            let window;
-            if (this._currentWindow >= 0)
-                window = this._appIcons[this._currentApp].cachedWindows[this._currentWindow];
-            else
-                window = null;
-            this._appIcons[this._currentApp].app.activate_window(window, global.get_current_time());
-        } else {
-            this._appIcons[n].app.activate_window(null, global.get_current_time());
-        }
+        // !mouseActive) activate the clicked-on app.
+        let window;
+        if (n == this._currentApp && this._currentWindow >= 0)
+            window = this._appIcons[n].cachedWindows[this._currentWindow];
+        else
+            window = null;
+        this._appIcons[n].app.activate_window(window, global.get_current_time());
         this.destroy();
     },